/*
 * GraphGenerator.h
 *
 *  Created on: 03-06-2012
 *      Author: Jakub Chomentowski
 */

#ifndef GRAPHGENERATOR_H_
#define GRAPHGENERATOR_H_

#include <math.h>
#include <stdlib.h>
#include <iostream>
#include <list>
#include "GraphDescriptor.h"

class GraphGenerator
{
	public:
		void generateGraph(GraphDescriptor &descriptor, int numberOfNodes,
				double probability, int maxWeight);
		void checkConnections(GraphDescriptor &descriptor,
				int maxWeight);

	private:
		inline double closedIntervalRand(double down, double up)
		{
			return down + (up - down) * rand() / ((double) RAND_MAX);
		}
};

#endif /* GRAPHGENERATOR_H_ */
